package com.yidu.view;

import com.google.gson.Gson;
import com.yidu.dao.TClassMapper;
import com.yidu.dao.TeacherMapper;
import com.yidu.domain.TClass;
import com.yidu.domain.Teacher;
import com.yidu.utils.SqlSessionTools;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

/**
 * <p>@Description: No Description</p>
 * <p>@Author yidu-liandyao</p>
 * <p>@Date: 2021-01-07</p>
 * <p>@Time: 9:35</p>
 */
public class TClassTest {
    @Test
    public void findById(){
        SqlSession session = SqlSessionTools.getSession();
        TClassMapper mapper = session.getMapper(TClassMapper.class);
        TClass cls = mapper.findById(1);
        Gson gson = new Gson();
        String json = gson.toJson(cls);
        System.out.println(json);

    }
}
